﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace BlazorAppAuth.Migrations
{
    /// <inheritdoc />
    public partial class Change_Order_Table_003 : Migration
    {
        /// <inheritdoc />
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropColumn(
                name: "AssemblyCount",
                table: "t_order");

            migrationBuilder.DropColumn(
                name: "AssemblyTime",
                table: "t_order");

            migrationBuilder.DropColumn(
                name: "DrillingCount",
                table: "t_order");

            migrationBuilder.DropColumn(
                name: "DrillingTime",
                table: "t_order");

            migrationBuilder.RenameColumn(
                name: "drillingTime",
                table: "t_order",
                newName: "DrillingTime");

            migrationBuilder.RenameColumn(
                name: "drillingCount",
                table: "t_order",
                newName: "DrillingCount");

            migrationBuilder.RenameColumn(
                name: "assemblyTime",
                table: "t_order",
                newName: "AssemblyTime");

            migrationBuilder.RenameColumn(
                name: "assemblyCount",
                table: "t_order",
                newName: "AssemblyCount");

            migrationBuilder.AlterColumn<DateTime>(
                name: "DrillingTime",
                table: "t_order",
                type: "TEXT",
                nullable: false,
                oldClrType: typeof(int),
                oldType: "INTEGER");

            migrationBuilder.AlterColumn<DateTime>(
                name: "AssemblyTime",
                table: "t_order",
                type: "TEXT",
                nullable: false,
                oldClrType: typeof(int),
                oldType: "INTEGER");
        }

        /// <inheritdoc />
        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.RenameColumn(
                name: "DrillingTime",
                table: "t_order",
                newName: "drillingTime");

            migrationBuilder.RenameColumn(
                name: "DrillingCount",
                table: "t_order",
                newName: "drillingCount");

            migrationBuilder.RenameColumn(
                name: "AssemblyTime",
                table: "t_order",
                newName: "assemblyTime");

            migrationBuilder.RenameColumn(
                name: "AssemblyCount",
                table: "t_order",
                newName: "assemblyCount");

            migrationBuilder.AlterColumn<int>(
                name: "drillingTime",
                table: "t_order",
                type: "INTEGER",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TEXT");

            migrationBuilder.AlterColumn<int>(
                name: "assemblyTime",
                table: "t_order",
                type: "INTEGER",
                nullable: false,
                oldClrType: typeof(DateTime),
                oldType: "TEXT");

            migrationBuilder.AddColumn<int>(
                name: "AssemblyCount",
                table: "t_order",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "AssemblyTime",
                table: "t_order",
                type: "TEXT",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));

            migrationBuilder.AddColumn<int>(
                name: "DrillingCount",
                table: "t_order",
                type: "INTEGER",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.AddColumn<DateTime>(
                name: "DrillingTime",
                table: "t_order",
                type: "TEXT",
                nullable: false,
                defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
        }
    }
}
